package cosc617_blackteam;

/**
 * @author Laura A state that represents a customer party being in the process
 *         of eating
 */
public class StateEating implements I_CustomerState {

	CustomerParty customer;

	public StateEating(CustomerParty customerParty) {
		this.customer = customerParty;
	}

	@Override
	public void assignToTable() {

		// does nothing if eating
	}

	@Override
	public void deliverFood() {
		// does nothing in this state

	}

	@Override
	public void decrimentTimeToEat() {
		if (customer.getTimeToEat() > 0)
			customer.decrimentTimeToEat();
		else
			customer.setState(customer.getStateWaitingToPay());

	}

	public boolean unseatCustomer() {
		// is not ready to be unseated in this state
		return false;

	}

	@Override
	public boolean needsSeating() {
		// TODO Auto-generated method stub
		return false;
	}

}
